import { request } from "@/utils/service"

/**
 * @param data 获取声音模型列表
 * @returns
 */
export const APIVoiceList = (data: any) => {
  return request<any>({
    url: "/voice/list",
    method: "POST",
    data
  })
}
/**
 * @param data 添加声音模型
 * @returns
 */
export const APIVoiceAdd = (data: any) => {
  return request<any>({
    url: "/voice/add",
    method: "POST",
    data,
    headers: {
      "Content-Type": false,
      "Process-Data": false
    }
  })
}

/**
 * @param  删除声音模型
 * @returns
 */
export const APIVoiceDel = (data: any) => {
  return request<any>({
    url: "/voice/del",
    method: "POST",
    data
  })
}

/**
 * @param  修改声音模型
 * @returns
 */
export const APIVoiceUp = (data: any) => {
  return request<any>({
    url: "/voice/up",
    method: "POST",
    data
  })
}

/**
 * @param  添加声音生成事件
 * @returns
 */
export const APITtsAdd = (data: any) => {
  return request<any>({
    url: "/tts/add",
    method: "POST",
    data
  })
}

/**
 * @param  获取我生成的声音历史
 * @returns
 */
export const APITtsList = (data: any) => {
  return request<any>({
    url: "/tts/list",
    method: "POST",
    data
  })
}

/**
 * @param  获取模型类型列表
 * @returns
 */
export const APIVoiceModels = () => {
  return request<any>({
    url: "/voice/models",
    method: "POST"
  })
}
/**
 * @param  获取模型的列表
 * @returns
 */
export const APIVoiceGetList = (data: any) => {
  return request<any>({
    url: "/voice/get_list",
    method: "POST",
    data
  })
}

/**
 * @param  删除模型
 * @returns
 */
export const APITtsDel = (data: any) => {
  return request<any>({
    url: "/tts/del",
    method: "POST",
    data
  })
}

/**
 * @param  获取提示
 * @returns
 */
export const APITextRand = () => {
  return request<any>({
    url: "/voice/text_rand",
    method: "POST"
  })
}
